package com.bzframework.core.auth.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * AopAuthorizeAutoConfiguration
 */
@Slf4j
@EnableConfigurationProperties(AuthenticateProperties.class)
public class AopAuthorizeAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean(AopAuthorizationController.class)
    public AopAuthorizationController aopAuthorizationController(AuthenticateProperties authenticateProperties) {
        return new AopAuthorizationController(authenticateProperties);
    }

}
